﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[proc_Customer_GetList_TelRepeat_Count]
	(
		@Tel nvarchar(50),
		@CompanyId int
	)
AS
	Select Count(0) As TelCount
	From ContactPerson a,Customer b
	Where  (a.Mobile=@Tel Or a.OfficeTel=@Tel) And a.IsMain=1 and a.CustomerId=b.CustomerId And b.Audit=1 and b.CompanyId = @CompanyId
	RETURN

